import groovy.jmx.builder.node.AttrNodeData

class AttrNodeDataTest extends GroovyTestCase {
    void testAttrNodeDataConstructor() {
        def attr = new AttrNodeData(name: "Attr", description: "Description", writable: false, defaultValue: 2)
        assert attr.name == "Attr"
        assert attr.description == "Description"
        assert attr.writable == false
        assert attr.defaultValue == 2
    }

    void testAttrNodeDataSetter() {
        def attr = new AttrNodeData()
        attr.name = "Attr"
        attr.description = "Description"
        attr.writable = true
        attr.defaultValue = 32

        assert attr.defaultValue == 32
        assert attr.writable == true
        assert attr.description == "Description"
        assert attr.name == "Attr"
    }
}